package com.cwl.pattern.原型模式;

/**
 * @program: pattern
 * @description:
 * @author: ChenWenLong
 * @create: 2019-06-24 13:53
 **/
public class PrototypeTest {

    public static void main(String[] args)throws CloneNotSupportedException{
        Realizetype obj1=new Realizetype();
        Realizetype obj2=(Realizetype)obj1.clone();
        //比较内存地址值,如果内存地址值不相等,则说明是在内存空间从新开辟出了一个空间
        System.out.println("obj1==obj2?"+(obj1==obj2));
    }
}
